#ifndef _POINTLIGHTMANAGER_H_
#define _POINTLIGHTMANAGER_H_

#include <map>
#include <windows.h>
#include <xnamath.h>
#include <d3d11.h>
#include <d3dx11async.h>
#include <Effect11/d3dx11effect.h>

#define MAX_POINTLIGHT 100

class BasicEffect;

struct PointLight
{
	XMFLOAT4 Color;
	XMFLOAT3 Position;
	float Power;
};

class PointsLightsManager
{
public:
	PointsLightsManager();
	PointsLightsManager(const PointsLightsManager&);
	~PointsLightsManager();

	bool Initialize();
	void SetBasicEffect(BasicEffect* pBasicEffect);
	void Uninit();
	void Update();
	void AddLight(PointLight *pLight);
	void RemoveLight(PointLight *pLight);
private:
	std::map<int, PointLight*> mHashPointLight;
	PointLight mListPointsLights[MAX_POINTLIGHT];
	bool mChangeSinceLastUpdate;
	BasicEffect* mBasicEffect;
};

#endif  // _POINTLIGHTMANAGER_H_
